declare
fname varchar2(20);
lname varchar2(15) default 'fernandez';
begin
dbms_output.put_line(fname||' ' ||lname);
end;


create function num_characters_car (p_string in varchar2)
return integer as
v_num_characters integer;
begin
select length(p_string) into v_num_characters from dual;
return v_num_characters;
end;

declare
v_length_of_string integer;
begin
v_length_of_string:=num_characters_car('Oracle Corporation');
dbms_output.put_line(v_length_of_string);
end;

declare
v_c_name wf_countries.country_name%type:=:country_name;
v_l_e wf_countries.lowest_elevation%type;
v_h_e wf_countries.highest_elevation%type;
begin
select lowest_elevation, highest_elevation into v_l_e,v_h_e from wf_countries
where country_name=v_c_name;
dbms_output.put_line(v_l_e||'   '||v_h_e);
end;


declare
v_l_e wf_countries.lowest_elevation%type;
v_h_e wf_countries.highest_elevation%type;
begin
select lowest_elevation, highest_elevation into v_l_e,v_h_e from wf_countries
where country_name='French Republic';
dbms_output.put_line(v_l_e||'   '||v_h_e);
end;

declare
v_c_name wf_countries.country_name%type:=:country_name;
v_l_e wf_countries.lowest_elevation%type;
v_h_e wf_countries.highest_elevation%type;
begin
select lowest_elevation, highest_elevation into v_l_e,v_h_e from wf_countries
where country_name=v_c_name;
dbms_output.put_line(v_l_e||'   '||v_h_e);
end;

declare
v_data1 date:=sysdate;
v_data2 v_data1%type;
begin
v_data2:=v_data1+1;
dbms_output.put_line('Hello World'||' today: '||v_data1||' tomorrow: '||v_data2);
end;

declare
my_date date;
v_last_day date;
begin
dbms_output.put_line(TO_CHAR(sysdate,'Month dd, yyyy'));
my_date:=sysdate;
v_last_day:=last_day(my_date);
dbms_output.put_line(v_last_day);
end;
